package com.spi.soconversion.util;

import java.util.ResourceBundle;

public class ConfigReader {

    /**
     * Holds the reference of Resource bundle for the SOConversion Queries 
     * properties file
     */
    private static final String RESOURCE_BUNDLE = 
        "com.spi.soconversion.Config";

    /**
     * Reference to the resource bundle
     */
    private static final ResourceBundle MESSAGE_BUNDLE = 
        ResourceBundle.getBundle(RESOURCE_BUNDLE);

    /**
     * This method returns the query corresponding to the integer lookup
     * provided
     * 
     * @param lookup The integer that represents the error to report
     * @return String The query for the given lookup
     */
    public static String getQuery(int lookup) {
        String result = null;
        if (null != MESSAGE_BUNDLE) {
            result = MESSAGE_BUNDLE.getString(Integer.toString(lookup));
        }
        return result;
    }
}